package hadoop.mr08;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

public class W_reduce extends Reducer<NullWritable,W_stuTable,W_stuTable,NullWritable> {
    // 输出的key必须实现DBWritable的方法
    // DBOutputFormat类
    @Override
    protected void reduce(NullWritable key, Iterable<W_stuTable> values, Reducer<NullWritable, W_stuTable, W_stuTable, NullWritable>.Context context) throws IOException, InterruptedException {
        for (W_stuTable s1:values){
            context.write(s1,key);
        }
    }
}
